package net.tv90.auth.model.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;


@Data
public class RegistrationByEmailDTO {

    @NotEmpty(message = "用户名不能为空")
    @Pattern(regexp = "^\\w{4,}$", message = "用户名必须大于4位，且只能包含字母、数字和下划线")
    String username;

    @NotEmpty(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    String email;

    @NotEmpty(message = "密码不能为空")
    //Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z\\\\W]{6,18}$", message = "密码必须大于6位，且只能包含数字、字符和特殊字符")
    String password;

    @NotEmpty(message = "验证码不能为空")
    String smsCode;
}
